package com.timebank.volunteer.mapper;

import com.timebank.common.core.web.pojo.AjaxResult;
import com.timebank.volunteer.pojo.entity.VolunteerAttendList;
import com.timebank.volunteer.pojo.vo.VolunteerAttendListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 志愿服务 出席名单
 * @author shiliuyinzhen
 */
@Mapper
public interface VolunteerAttendListMapper {

    /**
     * 获取出席名单
     * @param volunteerAttendList
     * @return
     */
    List<VolunteerAttendListVO> getAttendList(VolunteerAttendList volunteerAttendList);

    /**
     * 根据志愿服务Id和用户Ids删除出席名单
     * @param volunteerId
     * @param userIds
     * @return
     */
    int deleteAttendListByVolunteerIdAndUserIds(@Param("volunteerId") Long volunteerId, @Param("userIds") Long[] userIds);

    /**
     * 批量添加出席名单
     * @param volunteerAttendLists
     * @return
     */
    int batchInsertAttendList(@Param("attendLists") List<VolunteerAttendList> volunteerAttendLists);

    /**
     * 创建出席名单
     * @param volunteerAttendList
     */
    int insertAttendList(@Param("attendList") VolunteerAttendList volunteerAttendList);

    /**
     * 修改出席名单
     * @param volunteerAttendList
     * @return
     */
    int updateAttendList(VolunteerAttendList volunteerAttendList);
}
